#ifndef _I2C_AHT10_H
#define _I2C_AHT10_H



#include "air001xx.h"
#include "air001xx_hal_i2c.h"
#include "air001xx_hal_gpio.h"
#include "air001xx_hal_dma.h"
// #include "air001xx_hal_delay.h"

void aht10_I2C_init(void);
void HAL_AHT10_Init(void);
void HAL_AHT10_soft(void);
void HAL_AHT10_ReadData(void);



// OLED 
// ͼƬ��ʾ
#define BMP_32_REFLOW   4
#define BMP_32_HEATING  3
#define BMP_32_SET      5
#define BMP_32_STATE    1
#define BMP_32_CONTROL  2

#define BMP_32_RIGHT    6
#define BMP_32_LEFT     7

#define BMP_16_UNCHECKED   8
#define BMP_16_CHECKED     9

// ������ʾ

#define TEXT_16_STATE          0
#define TEXT_16_CONTROL        2
#define TEXT_16_HEATING        4
#define TEXT_16_REFLOW         6
#define TEXT_16_SET            9

#define TEXT_16_MAX            10

// #define ASC2_0816   0
// #define ASC2_1224   1
// #define NUMBER_1624 2
// #define NUMBER_2032 4
// #define CELSIUS_2424 3
// #define CELSIUS_1616 5


typedef enum
{
    ASC2_0816,
    ASC2_1224,
    NUMBER_1624,
    CELSIUS_2424,
    NUMBER_2032,
    CELSIUS_1616,
}DataType_enum;         // 





#define SYMBOL_PAH_ID           0       // %
#define SYMBOL_POINT_ID         1       // .

#define ASC2_MAX 		    91
#define NUM_MAX 		    10
#define CELSIUS_2424_MAX 	1


void oled_I2C_init(void);

void HAL_OLED_Init(void);

void oled_set_pos(uint8_t x,uint8_t y);

void oled_fill(uint8_t fillData);

void oled_clear(void);

void oled_on(void);

void oled_off(void);

void oled_show_str(uint8_t x,uint8_t y,uint8_t str[],uint8_t len,uint8_t textSize);

void oled_show_time(uint8_t x,uint8_t y,uint8_t hour,uint8_t min,uint8_t sec);

void oled_show_speed(uint8_t x,uint8_t y,float speed);

void oled_show_speed2(uint8_t x,uint8_t y,uint32_t speed);

void oled_show_temperature(uint8_t x,uint8_t y,int32_t temperature);

void oled_show_test(uint8_t x,uint8_t y,uint8_t test_1);

void display_IMU(uint8_t pos_x,uint8_t pos_y);

void oled_dis_clear(void);

void oled_dis_point(uint8_t x,uint8_t y);

void oled_dis_line(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2);

// void oled_dis_circle(uint8_t x,uint8_t y,uint8_t r);

void bresenhamCircle(uint8_t xc, uint8_t yc, uint8_t r); 

void drawLine(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1);

void oled_dis_rectangle(uint8_t x, uint8_t y, uint8_t w, uint8_t h);

void oled_dis_rectangle2(uint8_t x, uint8_t y, uint8_t w, uint8_t h);

void oled_dis_show(void);

void oled_show_dis_16_16_BMP(uint8_t x, uint8_t y,const uint8_t * data_dis);

void oled_show_dis_32_32_BMP(uint8_t x, uint8_t y,const uint8_t * data_dis);

const uint8_t *oled_show_get_BMP_data(uint8_t _id);

void oled_show_dis_ID(uint8_t bmp_x, uint8_t bmp_y, uint8_t _id);

void oled_show_dis_ID_Text(uint8_t bmp_x, uint8_t bmp_y, uint8_t _id);

void oled_show_dis_string(uint8_t bmp_x, uint8_t bmp_y, uint8_t str_size, const char * str, uint8_t str_leng);
void oled_show_dis_w_string(uint8_t bmp_x, uint8_t bmp_y, uint8_t str_size, const char * str, uint8_t str_leng);

void oled_show_dis_char(uint8_t bmp_x, uint8_t bmp_y, uint8_t str_size, uint8_t _id);

// void oled_show_dis_symbol(uint8_t bmp_x, uint8_t bmp_y, uint8_t _id);


extern const uint8_t data_dis_1[];
extern const uint8_t data_dis_2[];
extern const uint8_t data_dis_3[];
extern const uint8_t data_dis_4[];
extern const uint8_t data_dis_5[];
extern const uint8_t data_dis_6[];
extern const uint8_t data_dis_7[];
extern const uint8_t data_dis_16_1[];
extern const uint8_t data_dis_16_2[];



#endif
